package com.caigou.service;

import com.caigou.bean.cms.entity.SystemMessage;
import com.caigou.bean.cms.param.SystemMessageParam;
import com.caigou.bean.cms.param.SystemMessageQueryParam;
import com.caigou.bean.exam.entity.Users;
import com.caigou.util.Result;
import com.github.pagehelper.PageInfo;

public interface SystemMessageService {
    Long getMessageId();

    Result saveSystemMessage(SystemMessageParam systemMessageParam, Users user);

    Result updateSystemMessage(SystemMessageParam systemMessageParam, Users user);

    PageInfo<SystemMessage> querySystemMessage(SystemMessageQueryParam systemMessageQueryParam);

    SystemMessage selectByPrimaryKey(Integer id);

    SystemMessage selectByMessageId(Long messageId);

    int deleteByPrimaryKey(Integer id);

    int deleteByMessageId(Long messageId);

    int withdrawSystemMessage(Integer id);

    int autoPublishSystemMessage(int id);

    PageInfo<SystemMessage> listMyMessage(String userId, Integer pageNum, Integer pageSize);

    SystemMessage getAndReadSystemMessage(String userId, Long messageId);
}
